/**
 * Copyright &copy; 2018-2018 <a href="#">聚成科技</a> All rights reserved.
 */
package com.jckj.core.vos;

import com.jckj.core.validator.groups.Add;
import com.jckj.core.validator.groups.LoginCheck;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *     用户vo,添加一些数据验证
 * </p>
 *
 * @author 刘志远
 * @date 18-1-26
 */
public class SysUserVo {
    @NotNull(message = "用户名不能为空", groups = LoginCheck.class)
    @Min(value = 4, message = "用户名最小长度不能小4", groups = Add.class)
    @Max(value = 20, message = "用户名最大长度不能大于20", groups = Add.class)
    private String username;

    @NotNull(message = "密码不能为空", groups = LoginCheck.class)
    @Min(value = 6, message = "密码最小长度不能小于6", groups = {Add.class})
    @Max(value = 20, message = "密码最大长度不能大于20", groups = {Add.class})
    private String password;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
